/** @type {import('next').NextConfig} */
const withSass = require('@zeit/next-sass');
const nextConfig = {
  reactStrictMode: true,
  productionBrowserSourceMaps: true,
  webpack(config) {
    config.module.rules.push({
      test: /\.svg$/,
      use: ['@svgr/webpack'],
    }); // 针对 SVG 的处理规则

    return config;
  },
  async rewrites() {
    return [{ source: '/api/:path*', destination: `${process.env.API_URL}:path*` }];
  },
};
module.exports = nextConfig;
// module.exports = withSass(nextConfig)
